package com.airS.task.fileMgr.common.response;

/**
 * Created by alan on 2017/3/9.
 */
public enum ResponseCode implements StatusCode {
    SUCCESS(1, "操作成功"),
    SYSTEM_ERROR(80001, "系统开了点小差，请稍后再试"),
    PARAM_FAIL(80002, "参数错误"),
    AUTHENTICATION_FAIL(80003, "认证失败，请稍后再试"),
    BUSINESS_FAIL(80004, "操作失败"),
    REPEAT_FAIL(80005,"数据重复"),
    NOT_EXIST_FAIL(80006,"数据不存在"),
    NOT_SUPPORT_FAIL(80007,"不支持的业务"),
    AUTHORIZATION_FAIL(80008, "您尚未获取相应权限，请联系管理员分配"),
    XSS_FAIL(80009, "XSS非法入侵，系统已告警"),
    LOGIN_OUT(80010, "登入超时，请重新登入"),
    UNKNOWN_USER(80011, "账号或密码错误，请重试"),
    SESSION_CONNECT_TIME_OUT(80012, "会话管理器连接超时，请联系管理员");

    private int code;
    private String msg;

    private ResponseCode(int value, String text) {
        this.code = value;
        this.msg = text;
    }

    public int code() {
        return this.code;
    }

    public String msg() {
        return this.msg;
    }

    public String toString() {
        return String.valueOf(this.code);
    }
}
